FROM openjdk:23-slim

LABEL authors="zhangluning"
# 作者
MAINTAINER zhangluning

ENV SPRING_OUTPUT_ANSI_ENABLED=ALWAYS \
    START_SLEEP=0 \
    JAVA_OPTIONS="" \
    SERVER_ACTIVE="" \
    SERVER_IP=""

CMD echo "The Application Will Start In ${START_SLEEP}s..." && \
    sleep ${START_SLEEP} && \
    java ${JAVA_OPTIONS} \
    -Dspring.profiles.active=${SERVER_ACTIVE} \
    -Dspring.cloud.nacos.discovery.ip=${SERVER_IP} \
    -Djava.security.egd=file:/dev/./urandom \
    -jar /app.jar

EXPOSE 62001

ADD *.jar /app.jar
